<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
            var a = 100;
            function f1(){
                var b = 300;
                console.log(a);
                console.log(b);
                
                function f2(){
                    var b = 1000;
                    console.log(a);
                    console.log("f2"+b);
                }
                
                //局部函数,只在当前作用域中可以访问
                f2();
            }
            console.log(a);
            f1();
    </script>
</head>
<body>
    
</body>
</html>